import request from "@/utils/request";

// 创建门店用户信息
export function CreateStoresUserInfo(data) {
  return request({
    url: "/store/users/create",
    method: "post",
    data: data,
  });
}

// 查询门店用户角色
export function getStoresUserInfo(data) {
  return request({
    url: "/store/users/assign-user-role/query",
    method: "post",
    data: data,
  });
}

// 删除门店用户信息
export function deleteStoresUserInfo(query) {
  return request({
    url: "/store/users/delete",
    method: "delete",
    params: query,
  });
}

// 获得门店用户信息分页
export function getUsersInfo(query) {
  return request({
    url: "/store/users/page",
    method: "get",
    params: query,
  });
}

// 查询所有门店角色
export function getAllStoreRole(query) {
  return request({
    url: "/store/role/store/all",
    method: "get",
    params: query,
  });
}

// 赋予门店用户角色
export function CreateUserRole(data) {
  return request({
    url: "/store/users/assign-user-role/set",
    method: "post",
    data: data,
  });
}

// 设置用户管理门店
export function SetStores(data) {
  return request({
    url: "/store/users/store/set",
    method: "post",
    data: data,
  });
}

// 查询用户管理门店
export function InquireStores(data) {
  return request({
    url: "/store/users/store/query",
    method: "post",
    data: data,
  });
}

// 添加代理商用户
export function AddAgentUser(data) {
  return request({
    url: "/store/users/addAgentUser",
    method: "post",
    data: data,
  });
}

// 修改用户类型
export function UpdateUserType(data) {
  return request({
    url: "/store/users/store/userType/edit",
    method: "post",
    data: data,
  });
}

// 修改自动添加门店状态
export function EditUserSstoreAdd(data) {
  return request({
    url: "/store/users/store/add/edit",
    method: "post",
    data: data,
  });
}
